<?php


namespace app\admin\business;


use app\admin\controller\Common;
use think\facade\Db;

class CouponBus extends Common
{
    public function __construct()
    {
        parent::__construct();
    }


    /**
     * 获取优惠卷列表
     * @param $where
     * @param $sort_by
     * @param $sort_order
     * @param $pageSize
     * @param $page
     * @return array
     * @throws \think\db\exception\DbException
     */
    public static function getList($where,$sort_by,$sort_order,$pageSize,$page){
        $list = Db::name('coupon')
            ->where($where)
            ->order($sort_by . ' ' . $sort_order)
            ->paginate(array('list_rows' => $pageSize, 'page' => $page))
            ->toArray();
        return $list;
    }




}